<template>
    <div class="noticeItem" @click="go">
        <div class="title">
            {{ item.title }}
        </div>
        <div class="time">{{ getTime(item.createtime * 1000) }}</div>
    </div>
</template>
  
<script>
import { getTime } from "@/assets/utils/utils";
export default {
    name: "noticeItem",
    props: {
        item: {
            type: Object,
            default: () => {
                return {};
            },
        },
    },
    data() {
        return {
            getTime: getTime,
        };
    },
    computed: {},
    mounted() {},
    methods: {
        go() {
            this.$emit("click");
        },
    },
};
</script>
<style lang="scss" scoped>
.noticeItem {
    padding: 20px 40px 0;
    border-bottom: 1px solid #ebebeb;
    cursor: pointer;
    &:hover {
        background: #f7f9fb;
        .title{
            color: #1C87F3;
        }
    }
}

.title {
    font-size: 18px;
    color: #333333;
    padding-bottom: 8px;
}

.time {
    font-size: 14px;
    color: #999999;
    padding-bottom: 18px;
}
</style>
  